package appmodel;

import java.io.Serializable;
import java.util.Comparator;

@SuppressWarnings("serial")
public class ReverseComparator<T> implements Comparator<T>, Serializable {

	private Comparator<T> comp;
	private Integer criterio;
	
	public ReverseComparator(Comparator<T> comparator, Integer criterio) {
		this.comp = comparator;
		this.criterio = criterio;
	}

	public int compare(T arg0, T arg1) {
		return this.comp.compare(arg0, arg1) * this.criterio;
	}

}
